import re

def re_http(http):
    regex = re.compile( r'^(?:http|ftp)s?://', re.IGNORECASE)
    return regex.match(http).group(0)